﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WoW.DataManager
{
    public class DataManager
    {
        public static string MPQPath = ChoosePath();

        public static string ChoosePath()
        {
            var os = System.Environment.OSVersion;

            //Vista
            if (os.Version.Build ==6001 || os.Version.Build == 6000)
                return @"C:\Users\Public\Games\World of Warcraft\";

            return @"C:\Proram Files\World of Warcraft\";
        }

        public TerrainManager Terrainmanager { get; private set; }
        public static MPQManager MPQLoader { get; private set; }

        public DataManager(string WoWPath)
        {
            if (!String.IsNullOrEmpty(WoWPath))
            {
                MPQPath = WoWPath;
            }

            MPQLoader = new MPQManager();

            // Default to azeroth
            Terrainmanager = new TerrainManager(0);
        }

        public DataManager()
        {

            MPQLoader = new MPQManager();

            // Default to azeroth
            Terrainmanager = new TerrainManager(0);
        }

    }
}
